<?php
session_start();
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/database.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/functions.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/class.admin.php');
//ini_set('display_errors',1);
$admin=new admin();
$admin->canView($_SERVER['PHP_SELF']);
//$cachekey=DATABASE.'cached_page_'.$_POST['page_id'];
ini_set('display_errors',1);
$id=$_POST['settings_site_id'];
$item=array('current_theme'=>$_POST['settings_site_theme'],
			'folder_path'=>$_POST['settings_site_theme'],
			'url'=>$_POST['settings_site_url'],
			'name'=>$_POST['settings_site_name']);
$admin->saveSettings($id,$item);
$admin->createAdminBundle();
?>
<script>$.fn.message('show','<div class="ok_h_message"><h2>Success</h2><p><strong>The site settings have been saved</strong></p></div>');</script>

